package com.grj.template.boot.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @TableName user_role
 */
@TableName(value = "user_role")
@Data
@ApiModel(description = "用户角色实体类")
public class UserRole implements Serializable {

    @TableId
    @ApiModelProperty(value = "用户ID", example = "1", required = true)
    private Long userId;

    @ApiModelProperty(value = "角色ID", example = "1", required = true)
    private Long roleId;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间", example = "2023-10-01 12:00:00")
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间", example = "2023-10-01 12:00:00")
    private Date updateTime;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建用户ID", example = "1")
    private Long createUser;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新用户ID", example = "1")
    private Long updateUser;

    @ApiModelProperty(value = "逻辑删除标志", example = "0")
    private Integer deleted;

    private static final long serialVersionUID = 1L;
}
